
.btn {

  &:link,
  &:visited {
    text-transform: uppercase;
    text-decoration: none;
    padding: 1.5rem 4rem;
    border-radius: 10rem;
    display: inline-block;
    font-size: 1.6rem;
    transition: all .2s;
    position: relative;
  }

  &:hover {
    transform: translateY(-.3rem);
    box-shadow: 0 1rem 2rem rgba($color-black, 0.2);

    &::after {
      transform: scale(1.5);
      opacity: 0;
    }
  }

  &:active {
    transform: translateY(-.15rem);
    box-shadow: 0 0.5rem 1rem rgba($color-black, 0.2);
  }

  // 使用 ::after 添加按钮动画
  &::after {
    content: "";
    display: inline-block;
    width: 100%;
    height: 100%;
    border-radius: 10rem;
    z-index: -1;
    transition: all .3s;
    position: absolute;
    top: 0;
    left: 0;
  }


  &-white {
    color: $color-gray-dark;
    background-color: $color-white;

    &::after {
      background-color: $color-white;
    }
  }


  &-animated {
    animation: moveInBottom .5s ease-in-out;
    animation-delay: .75s;
    // 动画开始前显示第一帧（0%）定义的属性
    animation-fill-mode: backwards;
  }

}

.btn-text {
  &:link,
  &:visited {
    font-size: $default-font-size;
    color: $color-primary;
    display: inline-block;
    text-decoration: none;
    border-bottom: 1px solid $color-primary;
    padding: 3px;
    transition: all .2s;
  }

  &:hover {
    background-color: $color-primary;
    color: $color-white;
    box-shadow: 0 1rem 2rem rgba($color-black, $alpha: .15);
    transform: translateY(-2px);
  }

  &:active {
    box-shadow: 0 .5rem 1rem rgba($color-black, $alpha: .15);
    transform: translateY(-1px);
  }
}